home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / hp48sx_g.for < prev    next >
Internet Message Format  |  1991-04-12  |  2KB

  1. Path: santra!tut!sunic!mcsun!uunet!ogicse!caesar.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hpcvra!billw
  2. From: billw@hpcvra.CV.HP.COM (William C Wickes)
  3. Newsgroups: comp.sys.handhelds
  4. Subject: HP 48SX GROB Format
  5. Message-ID: <21580016@hpcvra.CV.HP.COM>
  6. Date: 12 Mar 90 19:08:06 GMT
  7. Organization: Hewlett-Packard Co., Corvallis, OR, USA
  8. Lines: 32
  9.  
  10. Many people seem interested in working with HP-48SX graphics objects (grobs)
  11. on their PC's.  To save you some trouble, here is the binary format:
  12.  
  13. <prolog><length><height><width><data....>
  14.  
  15. where the first four are 5-nibble fields:
  16.  
  17. prolog = grob object identifier = 02B1E
  18. length = distance in nibbles from start of length field to (just past) the
  19.          object end = F + # of data nibbles
  20. height = height in pixels
  21. width = width in pixels
  22.  
  23. To make life more interesting, the fields are written backwards (this is
  24. how the CPU reads memory), so e.g. the prolog is written E1B20.
  25.  
  26. The data starts at the upper left corner of the grob and proceeds
  27. left-to-right, top-to-bottom.  But--each pixel row must be a integral
  28. number of bytes (even number of pixels).  The data may therefore be
  29. padded with garbage bits to satisy this.  And--each nibble is written
  30. backwards compared to the LCD order, so the leftmost pixel in a group
  31. of four is the least-significant bit of the stored nibble.
  32.  
  33. A blank screen-sized grob looks like this:
  34.  
  35. E1B20|F8800|04000|38000|000000.... (2176 0'S),
  36.  
  37. where the |'s are for legibility.  The width of 83h = 131d pixels needs
  38. 17 bytes or 34 nibbles, so 40h = 64d rows gives 34x64 = 2176 nibbles of
  39. data. 2176 + 15 = 2191d = 88Fh, which is the length field content.
  40. If the upper-left-most pixel was turned on, the first data nibble would
  41. be a 1.
  42.  
  43.